from selenium.webdriver.common.by import By
from .base import Base


class EditPage(Base):   # 商品编辑页
    __NAME = (By.CSS_SELECTOR, "div.app-container form.el-form > div:nth-child(2) input.el-input__inner")
    __NUMBER = (By.CSS_SELECTOR, "div.app-container form.el-form > div:nth-child(3) input.el-input__inner")
    __SELLING_PRICE = (By.CSS_SELECTOR, "div.app-container form.el-form > div:nth-child(4) input.el-input__inner")
    __CLEAR = (By.CSS_SELECTOR, "div.app-container form.el-form > div")

    def clear(self):
        self.wait(self.__NAME)
        self.find_clear(self.__NAME)
        self.find_clear(self.__NUMBER)
        self.find_clear(self.__SELLING_PRICE)
